import { request } from '../../request';

export function addCategory(data) {
    return request({
        url: `/admin/category/add`,
        method: 'post',
        data: data
      })
}

export function getCategoryPageList(data) {
    
    return request({
        url: `/admin/category/list`,
        method: 'post',
        data: data
      })
}


export function deleteCategory(categoryId) {
    return request({
        url: `/admin/category/delete`,
        method: 'post',
        data: { id: categoryId }
    })
}

export function getCategorySelect() {
   
    return  request({
        url: `/admin/category/select/list`,
        method: 'post'
      })
}

